package com.atguigu.exer3;

public class TestElectricScooter {
    public static void main(String[] args) {
        //用无参构造创建对象
        ElectricScooter e1 = new ElectricScooter();
        e1.setScooterId("1001");
        e1.setBrand("XiaoMi");
//        e1.setBatteryLevel(85);
//        e1.setBatteryLevel(-85);
        e1.setBatteryLevel(185);
        e1.setAvailable(true);
        System.out.println("id : " + e1.getScooterId());
        System.out.println("brand : " + e1.getBrand());
        System.out.println("battery : " + e1.getBatteryLevel());
        System.out.println("available : " + e1.isAvailable());

        //用有参构造创建对象
        //查看参数列表的快捷键Ctrl + P
//        ElectricScooter e2 = new ElectricScooter("1002","华为",96,true);
        ElectricScooter e2 = new ElectricScooter("1002","华为",-96,true);
       //多行选中单词，统一修改的快捷键Alt + j，修改后按esc退出多行编辑模式
        System.out.println("id : " + e2.getScooterId());
        System.out.println("brand : " + e2.getBrand());
        System.out.println("battery : " + e2.getBatteryLevel());
        System.out.println("available : " + e2.isAvailable());

        System.out.println("默认的最高速度：" + ElectricScooter.getMaxSpeed());
        ElectricScooter.setMaxSpeed(30);
        System.out.println("默认的最高速度：" + ElectricScooter.getMaxSpeed());

        System.out.println("e1的最高速度：" + e1.getMaxSpeed());
        System.out.println("e2的最高速度：" + e2.getMaxSpeed());
    }
}
